<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="app">
        <p>{{msg}}</p>
        <button v-on:click="showInfo">请单击</button>
        <!-- “v-on”和“@”作用相同 -->
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                msg:"请单击按钮查看内容！"
            },
            methods:{
                showInfo(){
                    this.msg = "这是v-on指令！";
                }
            }       
        })
    </script>
</body>
</html>